<!DOCTYPE HTML>
<html>
	<head>
		<link href="ace/style.css" rel="stylesheet" type="text/css">
		<title>Textarea demo - ShareJS</title>
		<meta charset="utf-8">
		<style>
			#editor {
				font-size: 1em;
			}
		</style>
	</head>
	<body>
		<div id="header">
			<div id="htext">
				Editing <b>hello</b> with a textarea</input>
			</div>
		</div>
		<textarea id="editor" disabled>Loading...</textarea>

    <script src="/channel/bcsocket.js"></script>
		<script src="/share/share.uncompressed.js"></script>
		<script src="/share/textarea.js"></script>
		<script>
var elem = document.getElementById('editor');

sharejs.open('hello', 'text', function(error, doc) {
	window.doc = doc;
	if (error) {
		console.log(error);
	} else {
		elem.disabled = false;
		doc.attach_textarea(elem);
	}
});
		</script>
	</body>
</html>
		
